#include "main.h"

#ifndef FOC_TEST_SPEED_CONTROL_H
#define FOC_TEST_SPEED_CONTROL_H
/* 定义电机速度曲线类型枚举 */
typedef struct
{
    uint8_t Start_Flag;
    float Direction;
    float Distance;
    float Accelerate;
    float Velocity_Max;
    float T_acc;
    float D_acc;
    float T_full;
    float Current_Time;
    float Current_Velocity;
    float Current_Accelerate;
    float Current_Position;
}Speed_Execution;

extern float Function_Frequency;
extern float Current_Time;
extern float Current_Velocity;
extern float Current_Position;
extern Speed_Execution Motor;

void Profile_Generator_Init(Speed_Execution* motor,float Distance,float Accelerate,float Velocity_Max);
void Profile_Generator_Caculate(Speed_Execution *motor);
#endif //FOC_TEST_SPEED_CONTROL_H